import {
    Home,
    Swiper,
    AddShop,
    Shop,
    Recommend,
    SecondKill,
    Brand,
    Classify,
    Comment,
    Customer,
    Admin,
    Order,
    OrderSend,
    OrderComplete,
    OrderReturnBack,
    AddMsg,
    ShowMsg,
    AddActivity,
    ShowActivity
} from '../views'

import {
    ShoppingOutlined,
    AppstoreOutlined,
    CodeSandboxOutlined,
    TagsOutlined,
    SkinOutlined,
    PlusOutlined,
    ThunderboltOutlined,
    BulbOutlined,
    PictureOutlined,
    UserOutlined,
    UnorderedListOutlined,
    CommentOutlined,
    BarChartOutlined,
    CheckOutlined,
    RotateRightOutlined,
    RotateLeftOutlined,
} from '@ant-design/icons'

import { createFromIconfontCN } from '@ant-design/icons';

const IconFont = createFromIconfontCN({
    scriptUrl: [
        'https://at.alicdn.com/t/font_2867610_a5pziy318gq.js'
    ],
});

const routes = [{
    key: '0-0',
    path: '/home',
    title: '数据分析',
    icon: <BarChartOutlined />,
    component: Home
}, {
    key: '0-1',
    path: '/swiper',
    title: '轮播图管理',
    component: Swiper,
    icon: <PictureOutlined />
},{
    key:'0-2',
    path: '/activity',
    component: AddActivity,
    title: '活动管理',
    icon: <IconFont type="icon-liwuhuodong"/>,
    children: [{
        key:'0-2-0',
        path: '/activity/add',
        component: AddActivity,
        title: '添加活动',
        icon: <PlusOutlined />,
    },{
        key:'0-2-1',
        path: '/activity/list',
        component: ShowActivity,
        title: '活动列表',
        icon: <UnorderedListOutlined />
    }]
},{
    key: '0-3',
    path: '/pro',
    title: '产品管理',
    icon: <CodeSandboxOutlined />,
    component: Brand,
    children: [{
        key:'0-3-0',
        path:'/pro/brand',
        title:'品牌管理',
        icon: <TagsOutlined />,
        component: Brand
    },{
        key:'0-3-1',
        path:'/pro/classify',
        title:'分类管理',
        icon: <AppstoreOutlined />,
        component: Classify
    },{
        key:'0-3-2',
        path:'/pro/shop',
        title:'商品管理',
        icon:<ShoppingOutlined/>,
        component:Shop,
        children:[{
            key: '0-3-2-0',
            path: '/pro/shop/add',
            title: '添加商品',
            icon: <PlusOutlined />,
            component: AddShop
        }, {
            key: '0-3-2-1',
            path: '/pro/shop/all',
            title: '商品列表',
            icon: <SkinOutlined />,
            component: Shop
        }, {
            key: '0-3-2-2',
            path: '/pro/shop/recommend',
            title: '推荐商品',
            icon: <BulbOutlined />,
            component: Recommend
        }, {
            key: '0-3-2-3',
            path: '/pro/shop/second',
            title: '秒杀商品',
            icon: <ThunderboltOutlined />,
            component: SecondKill
        }]
    },{
        key:'0-3-3',
        path:'/pro/comment',
        title:'商品评价',
        icon: <CommentOutlined />,
        component: Comment
    }]
},{
    key:'0-4',
    path:'/order',
    title:'订单管理',
    icon:<IconFont type="icon-dingdan" />,
    component: Order,
    children: [{
        key: '0-4-0',
        path: '/order/list',
        title: '订单列表',
        icon: <UnorderedListOutlined/>,
        component: Order
    },{
        key: '0-4-1',
        path: '/order/send',
        title: '已发货订单',
        icon: <RotateRightOutlined />,
        component: OrderSend
    },{
        key: '0-4-2',
        path: '/order/complete',
        title: '已完成订单',
        icon: <CheckOutlined />,
        component: OrderComplete
    },{
        key: '0-4-3',
        path: '/order/return',
        title: '退货订单',
        icon: <RotateLeftOutlined />,
        component: OrderReturnBack
    }]
},{
    key: '0-5',
    path:'/msg',
    title: '消息中心',
    icon: <IconFont type="icon-tongzhi" />,
    component: ShowMsg,
    children: [{
        key: '0-5-0',
        path: '/msg/add',
        icon: <PlusOutlined />,
        title: '添加消息',
        component: AddMsg
    },{
        key: '0-5-1',
        path: '/msg/list',
        icon: <UnorderedListOutlined />,
        title: '消息列表',
        component: ShowMsg
    }]
},{
    key: '0-6',
    path: '/person',
    title: '用户管理',
    icon: <UserOutlined />,
    component: Customer,
    children: [{
        key: '0-6-0',
        path: '/person/user',
        title: '用户列表',
        icon: <UnorderedListOutlined />,
        component: Customer
    },{
        key: '0-6-1',
        path: '/person/admin',
        title: '管理员列表',
        icon: <UnorderedListOutlined />,
        component: Admin
    }]
}]

export default routes
